/*
 * @Description: 系统用户登陆信息接口
 */
import http from '@/utils/http'
import type { LoginData } from './types'

/**
 * 登录
 */
export function login(data: LoginData) {
  return 'xssasasasasas'+data
 // return http.post<string>('/admin/acl/index/login', data)
}

/**
 * 获取登录用户信息
 */
export function getUserInfo() {
  const userInfo = {
    "code": 200,
    "message": "成功",
    "data": {
        "routes": [
            "aaa",
            "User",
            "Category",
            "Discount",
            "ActivityEdit",
            "CouponRule",
            "Product",
            "Activity",
            "CouponAdd",
            "Trademark",
            "test1",
            "Attr",
            "ActivityAdd",
            "CouponEdit",
            "OrderShow",
            "111",
            "Permission",
            "Spu",
            "UserList",
            "ClientUser",
            "Order",
            "33",
            "t't",
            "Coupon",
            "permision",
            "Acl",
            "ActivityRule",
            "Role",
            "RoleAuth",
            "222",
            "Refund",
            "1223",
            "OrderSetting",
            "x",
            "OrderList",
            "Sku",
            "Home",
            "product-list",
            "setting-index",
            "Setting",
            "Donyin",
            "donyin-list"
            
        ],
        "buttons": [
            "cuser.detail",
            "cuser.update",
            "cuser.delete",
            "btn.User.add",
            "btn.User.remove",
            "btn.User.update",
            "btn.User.assgin",
            "btn.Role.assgin",
            "btn.Role.add",
            "btn.Role.update",
            "btn.Role.remove",
            "btn.Permission.add",
            "btn.Permission.update",
            "btn.Permission.remove",
            "btn.Activity.add",
            "btn.Activity.update",
            "btn.Activity.rule",
            "btn.Coupon.add",
            "btn.Coupon.update",
            "btn.Coupon.rule",
            "btn.OrderList.detail",
            "btn.OrderList.Refund",
            "btn.UserList.lock",
            "btn.Category.add",
            "btn.Category.update",
            "btn.Category.remove",
            "btn.Trademark.add",
            "btn.Trademark.update",
            "btn.Trademark.remove",
            "btn.Attr.add",
            "btn.Attr.update",
            "btn.Attr.remove",
            "btn.Spu.add",
            "btn.Spu.addsku",
            "btn.Spu.update",
            "btn.Spu.skus",
            "btn.Spu.delete",
            "btn.Sku.updown",
            "btn.Sku.update",
            "btn.Sku.detail",
            "btn.Sku.remove",
            "btn.all",
            "btn.test.2",
            "OrderList"
        ],
        "roles": [
            "超级管理员"
        ],
        "name": "admin",
        "avatar": "https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif"
    },
    "ok": true
}
return userInfo;
  // return http.get<UserRes>('/admin/acl/index/info')
}

/**
 * 退出登陆
 */
export function logout() {
  return http.post('/admin/acl/index/logout')
}
